package com.chukun.netty.tcpdecoder;

import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelPipeline;
import io.netty.channel.socket.SocketChannel;

public class TcpNettyClientInitializer extends ChannelInitializer<SocketChannel> {
    @Override
    protected void initChannel(SocketChannel ch) throws Exception {
        ChannelPipeline pipeline = ch.pipeline();
        pipeline.addLast(new PersonProtocalDecoder());
        pipeline.addLast(new PersonProtocalEncoder());
        pipeline.addLast(new TcpClientHandler());
    }
}
